//
//  MakeSchemeThirdTableViewCell.m
//  AnXin100
//
//  Created by Sakura on 2018/11/10.
//  Copyright © 2018 tzhg. All rights reserved.
//

#import "MakeSchemeThirdTableViewCell.h"

@interface MakeSchemeThirdTableViewCell ()

@end

@implementation MakeSchemeThirdTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self creatView];
        [self setlayout];
    }
    return self;
}

- (void)creatView {
    
    self.bgView = [[UIView alloc]init];
    self.bgView.cornerRadius = 5;
    self.bgView.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.bgView];
    
//    self.titleLabel = [[UILabel alloc]init];
//    self.titleLabel.textAlignment = NSTextAlignmentLeft;
//    self.titleLabel.text = @"病害及防治方法";
//    self.titleLabel.font = FONT_FOURTEEN;
//    self.titleLabel.textColor = COLOR_DIV;
//    [self.bgView addSubview:self.titleLabel];
    
    self.contentLabel1 = [[UILabel alloc]init];
    self.contentLabel1.text = @"病害名称:灰霉病";
    self.contentLabel1.font = FONT_FOURTEEN;
    self.contentLabel1.textColor = COLOR_Gray;
    [self.bgView addSubview:self.contentLabel1];
    
    self.contentLabel2 = [[UILabel alloc]init];
    self.contentLabel2.text = @"防治药剂:50%嘧菌环胺";
    self.contentLabel2.font = FONT_FOURTEEN;
    self.contentLabel2.textColor = COLOR_Gray;
    [self.bgView addSubview:self.contentLabel2];
    
    self.contentLabel3 = [[UILabel alloc]init];
    self.contentLabel3.text = @"亩用药剂量：50g";
    self.contentLabel3.font = FONT_FOURTEEN;
    self.contentLabel3.textColor = COLOR_Gray;
    [self.bgView addSubview:self.contentLabel3];
    
    self.contentLabel4 = [[UILabel alloc]init];
    self.contentLabel4.text = @"稀释倍数:1000倍";
    self.contentLabel4.font = FONT_FOURTEEN;
    self.contentLabel4.textColor = COLOR_Gray;
    [self.bgView addSubview:self.contentLabel4];
    
    self.contentLabel5 = [[UILabel alloc]init];
    self.contentLabel5.text = @"亩用药液:50kkg";
    self.contentLabel5.font = FONT_FOURTEEN;
    self.contentLabel5.textColor =COLOR_Gray;
    [self.bgView addSubview:self.contentLabel5];
    
    self.contentLabel6 = [[UILabel alloc]init];
    self.contentLabel6.text = @"施用方法:喷施";
    self.contentLabel6.font = FONT_FOURTEEN;
    self.contentLabel6.textColor =COLOR_Gray;
    [self.bgView addSubview:self.contentLabel6];
    
    self.contentLabel7 = [[UILabel alloc]init];
    self.contentLabel7.text = @"最多使用次数:2次";
    self.contentLabel7.font = FONT_FOURTEEN;
    self.contentLabel7.textColor =COLOR_Gray;
    [self.bgView addSubview:self.contentLabel7];
    
    self.contentLabel8 = [[UILabel alloc]init];
    self.contentLabel8.text = @"安全期隔期:15天";
    self.contentLabel8.font = FONT_FOURTEEN;
    self.contentLabel8.textColor =COLOR_Gray;
    [self.bgView addSubview:self.contentLabel8];
    
    
    
}

- (void)setlayout {
    
    self.bgView.sd_layout
    .leftSpaceToView(self.contentView, 10)
    .topSpaceToView(self.contentView, 5)
    .widthIs(SCREEN_WIDTH-20)
    .heightIs(130);
    
//    self.titleLabel.sd_layout
//    .leftSpaceToView(self.bgView, 10)
//    .topSpaceToView(self.bgView, 10)
//    .widthIs(SCREEN_WIDTH-40)
//    .heightIs(20);
    
    self.contentLabel1.sd_layout
    .leftSpaceToView(self.bgView, 10)
    .topSpaceToView(self.bgView, 10)
    .widthIs((SCREEN_WIDTH-20-30)/2)
    .heightIs(20);
    
    self.contentLabel2.sd_layout
    .leftSpaceToView(self.contentLabel1, 10)
    .topSpaceToView(self.bgView, 10)
    .widthIs((SCREEN_WIDTH-20-30)/2)
    .heightIs(20);
    
    self.contentLabel3.sd_layout
    .leftSpaceToView(self.bgView, 10)
    .topSpaceToView(self.contentLabel1, 10)
    .widthRatioToView(self.contentLabel1, 1)
    .heightRatioToView(self.contentLabel1, 1);
    
    
    self.contentLabel4.sd_layout
    .leftSpaceToView(self.contentLabel3, 10)
    .topSpaceToView(self.contentLabel1, 10)
    .widthIs((SCREEN_WIDTH-20-30)/2)
    .heightIs(20);
    
    
    self.contentLabel5.sd_layout
    .leftSpaceToView(self.bgView, 10)
    .topSpaceToView(self.contentLabel3, 10)
    .widthRatioToView(self.contentLabel1, 1)
    .heightRatioToView(self.contentLabel1, 1);
    
    self.contentLabel6.sd_layout
    .leftSpaceToView(self.contentLabel5, 10)
    .topSpaceToView(self.contentLabel4, 10)
    .widthIs((SCREEN_WIDTH-20-30)/2)
    .heightIs(20);
    
    self.contentLabel7.sd_layout
    .leftSpaceToView(self.bgView, 10)
    .topSpaceToView(self.contentLabel5, 10)
    .widthRatioToView(self.contentLabel1, 1)
    .heightRatioToView(self.contentLabel1, 1);
    
    self.contentLabel8.sd_layout
    .leftSpaceToView(self.contentLabel7, 10)
    .topSpaceToView(self.contentLabel6, 10)
    .widthIs((SCREEN_WIDTH-20-30)/2)
    .heightIs(20);

    [self setupAutoHeightWithBottomView:self.bgView bottomMargin:10];
    
    
}


- (void)awakeFromNib {
    [super awakeFromNib];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}

@end
